package instructions;

import memory.Address;
import memory.LongWord;
import memory.Word;
import memory.WordFinder;

public class Mul extends Arithmetic {
	
	public Mul(WordFinder address1, WordFinder word, Address adress2){
		super(address1,word,adress2);
	}
	
	protected Word operate(Word word, Word newWord) {
		return new LongWord(word.getValue() * newWord.getValue());		
	}
	
	public String toString(){
		return "MUL [" + address1 + "] " + "[" + word + "]" + " [" + address1 + "]\n";
	}
}
